﻿using Shop.DAL;
using Shop.Models;
using Shop.Models.DTO;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Shop.BLL
{
    public class ColorManager:BaseManager<Color>
    {
        ColorsService service = new ColorsService();
        /// <summary>
        /// 根据规格编号获取颜色
        /// </summary>
        /// <param name="infoId"></param>
        /// <returns></returns>
        public List<ColorImage> GetColors(int infoId)
        {
            return service.GetColorImages(infoId);
            //string where = "ProductInfoId=@pid";
            //SqlParameter[] sp = { new SqlParameter("@pid", infoId) };
            //try
            //{
            //    return service.GetList(where, sp);
            //}
            //catch
            //{
            //    throw;
            //}
        }
    }
}
